package nz.ac.massey.cs.se400_2013.ass3;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

public class TestExtendedObjectStore {
	
    /**
	 * @author jmcurtis
	 */
	
	private ExtendedObjectStore objectStore;
	
	@Before
	public void setup(){
		// adds stuff to test
		objectStore = ExtendedObjectStore.getInstance();
		
		Course course = new Course();
		course.setName("MSc");
		
		Student jim = new Student();
		jim.setName("Curtis");
		jim.setFirstName("James");
		
		Paper paper = new Paper();
		paper.setId("42");
		paper.setName("paper");
		
		course.addPaper(paper);
		
		Address address = new Address();
		address.setStreet("Surf Street");
		address.setCity("Palmerston North");
		
		jim.setAddress(address);
		jim.addPaper(paper);
		jim.setCourse(course);
		
		
		
		objectStore.COURSES.add(course);
	}
	
//	@Test
//	public static void test() {
//		
//		Visitor visitor = th
//		
//		assertTrue(true);
//		assertTrue(visitor.getCourses().iterator().next().getName().contains("MSc"));
//		assertTrue(visitor.getPapers().iterator().next().getId().contains("42"));
//		assertTrue(visitor.getPapers().iterator().next().getName().contains("paper"));
//		assertTrue(visitor.getStudents().iterator().next().getName().contains("Curtis"));
//		assertTrue(visitor.getStudents().iterator().next().getFirstName().contains("James"));
//		assertTrue(visitor.getStudents().iterator().next().getCourse().getName().contains("MSc"));
//		assertTrue(visitor.getAddresses().iterator().next().getStreet().contains("Surf Street"));
//		assertTrue(visitor.getAddresses().iterator().next().getCity().contains("Palmerston North"));
//		assertEquals(visitor.getAddresses().iterator().next().getNo(),42);
//
//	}
	
	@Test
	public static void recursion(){
		
	}
}
